#  This file is part of -_-.
#
#    -_- is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    -_- is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with -_-.  If not, see <http://www.gnu.org/licenses/>.
#
#    Copyright 2012 Oliver Katz

include ../../config.mk

OBJ=display_engine.o display_engine_api.o display_engine_loader.o

build : $(OBJ) builder.o
	$(AR) $(ARFLAGS) lib-_-display-engine.a display_engine.o display_engine_api.o display_engine_loader.o ../layout_engine/layout_engine.o ../backend_opengl.o
	$(CC) $(CFLAGS) builder.o -o -_-display-engine-builder $(LDFLAGS)

libtest_display_engine.so : test_display_engine.cpp
	./-_-display-engine-builder test_display_engine.cpp

test : libtest_display_engine.so test_display_engine_loader.o
	$(CXX) $(CXXFLAGS) test_display_engine_loader.o -o test_display_engine_loader -l-_-display-engine $(LDXXFLAGS)

clean :
	$(RM) $(RMFLAGS) $(shell echo *.o *.a) -_-display-engine-builder libtest_display_engine.so test_display_engine_loader
